package com.yvon.boot.mybatis.page;

import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 排序参数
 *
 * @author : Yvon
 * @since : 2021-09-03
 */
@Data
@NoArgsConstructor
public class OrderParam implements Serializable {
    private static final long serialVersionUID = -407107363310647003L;

    @ApiModelProperty(value = "字段名")
    private String fieldName;

    @ApiModelProperty(value = "排序类型[asc-升序, desc-降序]")
    private Order order;

    public enum Order {
        asc,
        desc;

        Order() {
        }
    }
}
